Skip to content

[6.2] Embedded Wasm: enable import WASILibc #83846

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 22, 2025

Conversation

MaxDesiatov
Copy link
Contributor

@MaxDesiatov MaxDesiatov commented Aug 21, 2025

Explanation: Cherry-pick of #83792, merged as 450cb14
WASILibc wasn't built for the embedded stdlib in stdlib/public/Platform/CMakeLists.txt. New copy_wasilibc_modulemap_embedded_resource and embedded-stdlib-platform-${triple} targets are added, the latter for wasm32-unknown-wasip1 only for now. Also added a wasilibc_functions.swift test to verify the result.
Scope: limited to Embedded Swift for Wasm;
Risk: low due to limited scope;
Testing: added new lit test to the existing Embedded Swift test suite;
Issue: rdar://157467412
Reviewer: @bnbarham

WASILibc wasn't built for the embedded stdlib in `stdlib/public/Platform/CMakeLists.txt`. New `copy_wasilibc_modulemap_embedded_resource` and `embedded-stdlib-platform-${triple}` targets are added, the latter for `wasm32-unknown-wasip1` only for now. Also added a `wasilibc_functions.swift` test to verify the result.

Resolves swiftlang#83513

rdar://157467412
This fixes wasi-libc.modulemap not found after installation
@MaxDesiatov MaxDesiatov added test suite Area: test suite cmake embedded Embedded Swift WebAssembly Platform: WebAssembly WASI WebAssembly System Interface support swift 6.2 labels Aug 21, 2025
@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

@MaxDesiatov MaxDesiatov changed the title Embedded wasilibc 6.2 [6.2] Embedded Wasm: enable import WASILibc Aug 21, 2025
@MaxDesiatov MaxDesiatov marked this pull request as ready for review August 21, 2025 14:45
@MaxDesiatov MaxDesiatov requested a review from a team as a code owner August 21, 2025 14:45
@MaxDesiatov
Copy link
Contributor Author

@swift-ci build toolchain

@MaxDesiatov
Copy link
Contributor Author

@swift-ci build toolchain macos

@MaxDesiatov MaxDesiatov merged commit 9453946 into swiftlang:release/6.2 Aug 22, 2025
8 checks passed
@MaxDesiatov MaxDesiatov deleted the embedded-wasilibc-6.2 branch August 22, 2025 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmake embedded Embedded Swift swift 6.2 test suite Area: test suite WASI WebAssembly System Interface support WebAssembly Platform: WebAssembly
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants